package com.ruoyi.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import com.ruoyi.common.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.Date;
import java.util.Map;
import java.util.HashMap;
import java.math.BigDecimal;

/**
 * 团购规则设置对象 tb_discount_condition
 *
 * @author ruoyi
 * @date 2021-02-19
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("tb_discount_condition")
public class TbDiscountCondition implements Serializable {

private static final long serialVersionUID=1L;


    /** ID */
    @TableId(type = IdType.ID_WORKER)
    private String id;

    /** 折扣开始时间 */
//    @Excel(name = "折扣开始时间" , width = 30, dateFormat = "yyyy-MM-dd")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    private Date discountTimeStart;

    /** 折扣结束时间 */
//    @Excel(name = "折扣结束时间" , width = 30, dateFormat = "yyyy-MM-dd")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    private Date discountTimeEnd;

    /** 商品ID */
    private String goodsId;

    /** 团购定金 */
    @Excel(name = "团购定金")
    private BigDecimal eamestMoney;

    /** 折扣类型(配置字典) */
    @Excel(name = "折扣类型(配置字典)")
    private String discountType;

    /** 百分比折扣 */
    @Excel(name = "折扣金额")
    private BigDecimal discountMoney;

    /** 折扣金额 */
    @Excel(name = "折扣金额")
    private BigDecimal percent;

    /** 创建人 */
    private String createBy;

    /** 创建时间 */
    private Date createTime;

    /** 更新人 */
    private String updateBy;

    /** 更新时间 */
    private Date updateTime;

    /** UserId */
    private String userId;

    @TableField(exist = false)
    private Map<String, Object> params = new HashMap<>();
}
